<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>欢迎来到博客</title>
</head>
<body>
{% extends "base.html" %}

{% block content %}
    <table>
        <tr valign="top">
            <td><img src="{{user.avatar(128)}}"></td>
            <td>
                <h1>User: {{ user.username }}</h1>
                {% if user.about_me %}<p>{{ user.about_me }}</p>{% endif %}
                {% if user.last_seen %}<p>最近登录: {{ user.last_seen }}</p>{% endif %}
                {% if user==current_user %}
                   <p><a href="{{url_for('edit_profile')}}">个人资料编辑</a></p>
                {% endif %}
            </td>
        </tr>
    </table>
    
    <hr>
    {% for post in posts %}
       {% include '_post.html' %}
    {% endfor %}
{% endblock %}

</body>
<html>
